package montaltoDirections

/**
 * Created by IntelliJ IDEA.
 * User: Andrew Montalto
 * Date: Apr 25, 2010
 * Time: 9:20:24 PM
 * To change this template use File | Settings | File Templates.
 */

object DirectionList{
  def get:List[Direction]={
    return List(
      new North,
      new NorthEast,
      new East,
      new SouthEast,
      new South,
      new SouthWest,
      new West,
      new NorthWest )
  }
 }
trait Direction{
  def getX():Int
  def getY():Int
  override def toString:String
}
class North extends Direction{
  private val x = 0
  private val y = 1
  def getX():Int={return x}
  def getY():Int = {return y}
  override def toString:String = {"North"}
}
class NorthEast extends Direction{
  private val x = 1
  private val y = 1
  def getX():Int={return x}
  def getY():Int = {return y}
  override def toString:String = {"NorthEast"}
}
class East extends Direction{
  private val x = 0
  private val y = 1
  def getX():Int={return x}
  def getY():Int = {return y}
  override def toString:String = {"East"}
}
class SouthEast extends Direction{
  private val x = 1
  private val y = -1
  def getX():Int={return x}
  def getY():Int = {return y}
  override def toString:String = {"SouthEast"}
}
class South extends Direction{
  private val x = 0
  private val y = -1
  def getX():Int={return x}
  def getY():Int = {return y}
  override def toString:String = {"South"}
}
class SouthWest extends Direction{
  private  val x = -1
  private val y = -1
  def getX():Int={return x}
  def getY():Int = {return y}
  override def toString:String = {"SouthWest"}
}
class West extends Direction{
  private val x = -1
  private val y = 0
  def getX():Int={return x}
  def getY():Int = {return y}
  override def toString:String = {"West"}
}
class NorthWest extends Direction{
  private val x = -1
  private val y = 1
  def getX():Int={return x}
  def getY():Int = {return y}
  override def toString:String = {"NorthWest"}
}